<?php
// <copyright file="AuthenticationType.cs" company="NQtec">
// Copyright (c) 2008, 2009 All Right Reserved, http://www.dqer.com/
// Copyright (c) 2008, 2009 All Right Reserved, http://www.nqtec.com/
//
// This source is part of the DQER library that released under the LGPL.
// Please see the License.txt file for more information.
// All other rights reserved.
//
// THIS CODE AND INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY 
// KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
// IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
// PARTICULAR PURPOSE.
//
// </copyright>
// <author>Victor Gatkov</author>
// <email>v.gatkov@nqtec.com</email>
// <email>info@dqer.com</email>
// <date>2008-09-11</date>
// <summary>Contains a base, abstract class for an AuthorisationPolicyProvider</summary>

class Session {

   var $value_array              = array();
   var $error_array              = array();


   function Session() {
      $this->startSession();
   }

   function startSession(){
      session_start();
   }

   function get_uid() {
    return $_SESSION['uid'.CCID];
   }
   function set_uid($uid) {
    $_SESSION['uid'.CCID] = $uid;
   }
   function get_ulv() {
    return $_SESSION['ulv'.CCID];
   }
   function set_ulv($ulv) {
    $_SESSION['ulv'.CCID] = $ulv;
   }

   function get_xb() {
    $xb = $_SESSION['xb'.CCID];
    $_SESSION['xb'.CCID] = md5(uniqid(rand(), true)); // can be requested only once!?
    return $xb;

   }
   function set_xb($xb) {
    $_SESSION['xb'.CCID] = $xb;
   }
   function set_xbts() {
    $_SESSION['xbts'.CCID] = time();
   }
   function get_tx() {
    $tx = $_SESSION['tx'.CCID];
    $_SESSION['tx'.CCID] = md5(uniqid(rand(), true)); // can be requested only once!?
    return $tx;
   }
   function set_tx($d) {
    $_SESSION['tx'.CCID] = $d;
   }

   function value_array($arr) {
    $_SESSION['value_array'] = $arr;
   }
   function error_array($arr) {
    $_SESSION['error_array'] = $arr;
   }

};

?>
